<?php
/**
 *
 * @category   babel 
 * @package    BABEL
 * @author     Hannes Magnusson <hannes.magnusson@gmail.com>
 * @copyright  2008 Team babel
 * @license    LGPL
 */

function no($title, $why) {
	global $obj_html;

	js(json_encode(array(
			"ok" => false,
			"title" => $title,
			"content" => $obj_html->displayMessage("error", $why),
	)));
}
function yes($val) {
	global $obj_html;

	js(json_encode(array(
			"ok" => is_numeric($val) ? $val : $obj_html->displayMessage("success", $val),
	)));
}
function js($str) {
	header('X-JSON: ('.$str.')');

	echo $str;
	exit;
}

